package com.big.app.controller;


import com.big.app.service.intf.MessagesService;
import com.big.app.vo.R;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: zjl
 * @description
 * @date: 2022/4/18 21:23
 */
@RestController
@RequestMapping("/api/messages/")
@Api(value = "实现商店信息展示相关操作",tags = "实现商店信息展示相关操作")
@CrossOrigin
public class MessagesController {
    @Autowired
    private MessagesService messagesService;
    @GetMapping("all.do")
    public R all(){return messagesService.all();}
    @GetMapping("selectEq.do")
    public R selectEq(Integer flag){return messagesService.selectEq(flag);}
    @GetMapping("selectByPrice.do")
    public R selectByPrice(){return messagesService.selectByPrice();}
    @GetMapping("selectByStar.do")
    public R selectByStar(){return messagesService.selectByStar();}
    @GetMapping("selectByPriceDq.do")
    public R selectByPriceDq(Integer flag){return messagesService.selectByPriceDq(flag);}
    @GetMapping("selectByStarDq.do")
    public R selectByStarDq(Integer flag){return messagesService.selectByStarDq(flag);}
    @GetMapping("search.do")
    public R search(String search){return messagesService.search(search);}
    @GetMapping("hottop.do")
    public R hot(){
        return messagesService.queryHotTop();
    }
}
